import http from '@/utils/http'


export function getOrderAPI() {
    return http({
        url: '/order/member/order/pre',
        method: 'get'
    })
}

export function createOrderAPI(data) {
    return http({
        url: '/order/api/order/create',
        method: 'POST',
        data
    })
}

export function getOrderStatus(userId, status) {
    return http({
        url: `/order/api/order/getByUserIdAndStatus/${userId}/${status}`,
        method: 'get',
    })
}

export function updateOrderStatus(oid, status) {
    return http({
        url: `/order/api/order/update/${oid}/${status}`,
        method: 'get',
    })
}

export function getOrderStatusInfo(oid) {
    return http({
        url: `/order/api/order/get/${oid}`,
        method: 'get',
    })
}

export function refundOrder(data) {
    return http({
        url: `/order/api/order_seller/refund_order/${data.orderId}`,
        method: 'POST',
        data
    })
}




